<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
  <div class="login-box" id="rrapp" v-cloak>
  <div class="login-logo">
    <b>入驻申请</b>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
      <div class="form-group has-feedback">
        <input type="text" class="form-control" v-model="username" placeholder="申请人姓名">
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="text" class="form-control" v-model="mobile" placeholder="手机号码" ><br/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="le" class="form-control" v-model="license" placeholder="上传营业执照" @click="uploadImg"><br/>
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="button" class="form-control" v-model="idcard1" placeholder="上传身份证正面照"><br/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="button" class="form-control" v-model="idcard2" placeholder="上传身份证反面照"><br/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="text" class="form-control" v-model="bankusername" placeholder="姓收款账户名" ><br/>
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="text" class="form-control" v-model="bankname" placeholder="开户行" ><br/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="text" class="form-control" v-model="bankcard" placeholder="收款银行账号" ><br/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      
      <div class="row">
        <div class="col-xs-8">
          <div class="checkbox icheck">
          </div>
        </div>
        <!-- /.col -->
        <div class="col-xs-4">
          <button type="button" class="btn btn-primary btn-block btn-flat" @click="submitApplication">提交申请</button>
        </div>
        <!-- /.col -->
      </div>
    <!-- /.social-auth-links -->

  </div>
  <form action="/apply/submit" method="GET">
    <input type="text" placeholder="收款银行账号" name="bankcard"><br/>
     <input type="submit" value="提交">
  </form>
  
  <script src="statics/libs/jquery.min.js"></script>
  <script src="statics/libs/vue.min.js"></script>
  <script src="statics/libs/bootstrap.min.js"></script>
  <script src="statics/libs/jquery.slimscroll.min.js"></script>
  <script src="statics/libs/fastclick.min.js"></script>
  <script src="statics/libs/app.js"></script>
  <script type="text/javascript">
  var vm = new Vue({
		el:'#rrapp',
		data:{
			username: '',
			mobile: '',
			license:'',
			idcard1:'',
			idcard2:'',
			bankusername:'',
			bankname:'',
			bankcard:'',
		},
		beforeCreate: function(){
			if(self != top){
				top.location.href = self.location.href;
			}
		},
		methods: {
			uploadImg:function(event){
				alert("uploadImg");
			},
			uploadImg1:function(event){
				alert("uploadImg1")
			},
			submitApplication: function (event) {
				var data = "username="+vm.username+"&password="+vm.password+"&captcha="+vm.captcha;
				$.ajax({
					type: "POST",
				    url: "sys/login",
				    data: data,
				    dataType: "json",
				    success: function(result){
						if(result.code == 0){//登录成功
							parent.location.href ='index.html';
						}else{
							vm.error = true;
							vm.errorMsg = result.msg;
							
							vm.refreshCode();
						}
					}
				});
			}
		}
	});
  </script>
</body>
</html>